<?php
namespace Auth\Model;

class UserEntity
{

    public $id;

    public $email;

    public $password;

    public $passwordSalt;

    public $fullname;

    public $avatar;

    public $created_time;

    public $modifiedTime;

    public $lastLogin;
    public $phone;
    public $birthday;
    public $sex;
   /**
     * @return the $phone
     */
    
    public function exchangeArray($data){
        $this->id = (isset($data['id'])) ? $data['id'] : null;
        $this->email = (isset($data['email'])) ? $data['email'] : null;
        $this->password = (isset($data['password'])) ? $data['password'] : null;
        $this->passwordSalt = (isset($data['passwordSalt'])) ? $data['password_salt'] : null;
        $this->fullname = (isset($data['fullname'])) ? $data['fullname'] : null;
        $this->avatar = (isset($data['avatar'])) ? $data['avatar'] : null;
        $this->phone = (isset($data['phone'])) ? $data['phone'] : null;
        
        $this->sex = (isset($data['sex'])) ? $data['sex'] : null;
        $this->birthday = (isset($data['birthday'])) ? $data['birthday'] : null;
        $this->created_time = (isset($data['created_time'])) ? $data['created_time'] : null;
        $this->modifiedTime = (isset($data['modifiedTime'])) ? $data['modifiedTime'] : null;
        $this->lastLogin = (isset($data['lastLogin'])) ? $data['lastLogin'] : null;
        
      
        
       
        
        return $this;
    }
    public function getPhone()
    {
        return $this->phone;
    }

	/**
     * @return the $birthday
     */
    public function getBirthday()
    {
        return $this->birthday;
    }

	/**
     * @return the $sex
     */
    public function getSex()
    {
        return $this->sex;
    }

	/**
     * @param field_type $phone
     */
    public function setPhone($phone)
    {
        $this->phone = $phone;
    }

	/**
     * @param field_type $birthday
     */
    public function setBirthday($birthday)
    {
        $this->birthday = $birthday;
    }

	/**
     * @param field_type $sex
     */
    public function setSex($sex)
    {
        $this->sex = $sex;
    }

	/*  public function getArrayCopy(){
        return get_object_vars($this);
    } */
    /**
     * @return the $id
     */
    public function getId()
    {
        return $this->id;
    }

	/**
     * @return the $email
     */
    public function getEmail()
    {
        return $this->email;
    }

	/**
     * @return the $password
     */
    public function getPassword()
    {
        return $this->password;
    }

	/**
     * @return the $passwordSalt
     */
    public function getPasswordSalt()
    {
        return $this->passwordSalt;
    }

	/**
     * @return the $fullname
     */
    public function getFullname()
    {
        return $this->fullname;
    }

	/**
     * @return the $avatar
     */
    public function getAvatar()
    {
        return $this->avatar;
    }

	/**
     * @return the $created_time
     */
    public function getCreated_time()
    {
        return $this->created_time;
    }

	/**
     * @return the $modifiedTime
     */
    public function getModifiedTime()
    {
        return $this->modifiedTime;
    }

	/**
     * @return the $lastLogin
     */
    public function getLastLogin()
    {
        return $this->lastLogin;
    }

	/**
     * @param field_type $id
     */
    public function setId($id)
    {
        $this->id = $id;
    }

	/**
     * @param field_type $email
     */
    public function setEmail($email)
    {
        $this->email = $email;
    }

	/**
     * @param field_type $password
     */
    public function setPassword($password)
    {
        $this->password = $password;
    }

	/**
     * @param field_type $passwordSalt
     */
    public function setPasswordSalt($passwordSalt)
    {
        $this->passwordSalt = $passwordSalt;
    }

	/**
     * @param field_type $fullname
     */
    public function setFullname($fullname)
    {
        $this->fullname = $fullname;
    }

	/**
     * @param field_type $avatar
     */
    public function setAvatar($avatar)
    {
        $this->avatar = $avatar;
    }

	/**
     * @param field_type $created_time
     */
    public function setCreated_time($created_time)
    {
        $this->created_time = $created_time;
    }

	/**
     * @param field_type $modifiedTime
     */
    public function setModifiedTime($modifiedTime)
    {
        $this->modifiedTime = $modifiedTime;
    }

	/**
     * @param field_type $lastLogin
     */
    public function setLastLogin($lastLogin)
    {
        $this->lastLogin = $lastLogin;
    }

	public function __construct()
    {
        $this->created_time =  date('Y-m-d H:i:s');
    }

   
    
}